package string;

public class StringBuilderDemo {
    public static void main(String[] args) {
        StringBuilder stringBuilder1 = new StringBuilder();
        StringBuilder stringBuilder2 = new StringBuilder("abc");
        String str = "abc";
        StringBuilder stringBuilder3 = new StringBuilder(str);
        String str1 = stringBuilder3.toString();
        System.out.println(stringBuilder1+" "+stringBuilder2+" "+str+" ");

        stringBuilder1.append("好好学习Java,为了找到好工作");
        System.out.println(stringBuilder1);
        stringBuilder1.replace(9,16,"为了改变世界");
        System.out.println(stringBuilder1);
        stringBuilder1.delete(0,8);
        System.out.println(stringBuilder1);
        stringBuilder1.insert(0,"活着");
        System.out.println(stringBuilder1);


    }
}
